<template>
  <div style="margin-top: 20px; margin-left: 40px;">
    <el-form :model="form" :rules="rules" ref="form" label-width="100px" label-position="top">
      <el-form-item label="中标项目" prop="WinningBid">
        <el-button style="margin-left: 1px;width: 230px" icon="el-icon-coin" @click="bAdd">
          选择数据
        </el-button>
      </el-form-item>

      <div class="custom-descriptions">
        <span>招投标项目编号 <b>YB2023121800014</b></span><br/><br/>
        <span>项目名称 <b> 沈大成SV·1</b></span><br/><br/>
      </div>

      <el-form-item label="中标供应商" prop="WinningSupplier">
        <el-button style="margin-left: 1px;width: 230px" icon="el-icon-coin" @click="deptshow">
          选择部门
        </el-button>
      </el-form-item>

      <el-form-item label="通知日期" prop="mailingDate">
        <el-input v-model="form.mailingDate" :disabled="true" placeholder="请输入内容" size="mini"/>
      </el-form-item>
    </el-form>

    <div slot="footer" class="dialog-footer">
      <el-button >确 定</el-button>
      <el-button >取 消</el-button>
    </div>

<!-- 选择数据 -->
    <el-dialog title="选择数据" :visible.sync="bopen" width="600px" >
    <el-row>
      <el-col :span="10" :push="8"><el-input placeholder="请输入内容" prefix-icon="el-icon-search" size="mini"/></el-col>
    </el-row>
     <br/>

        <el-table>
              <el-table-column type="selection" width="55" align="center" />
              <el-table-column label="招投标项目编号" align="center" prop="sysDeptList" >
              </el-table-column>
              <el-table-column label="项目名称" align="center" prop="supplierFullName" >
              </el-table-column>
              <el-table-column/>
        </el-table>
        <!-- 分页-->
           <!-- <pagination
              v-show="total>0"
              :total="total"
              :page.sync="queryParams.pageNum"
              :limit.sync="queryParams.pageSize"
              @pagination="getList"
            /> -->
    </el-dialog>

<!-- 选择部门 -->
    <el-dialog  :visible.sync="openb" width="400px"  title="部门列表" append-to-body>
        <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="组织架构" name="first">阿里巴巴（中国）软件有限公司</el-tab-pane>
            <el-tab-pane label="当前用户所处部门" name="second">阿里巴巴（中国）软件有限公司</el-tab-pane>
        </el-tabs>
     </el-dialog>
  </div>


</template>

<script>
export default {
  data() {
    return {
      //选择数据
      bopen: false,
      //选着部门
      openb: false,
      //选着部门
      activeName: 'second',
      form: {
        WinningBid:"",
        WinningSupplier:"",

        mailingDate: new Date().toISOString().substr(0, 10) // 设置默认值为当天日期
      },
      rules: {
        // 添加验证规则
          WinningBid: [
                { required: true, message: '请选择中标项目', trigger: 'change' } // 中标项目验证规则
              ],
          WinningSupplier: [
                { required: true, message: '请选择中标项目', trigger: 'change' } // 中标供应商验证规则
              ],
      }
    };
  },
  methods: {
    bAdd() {
      this.bopen = true;
    },
    deptshow(){
      this.openb =true;
    },
    handleClick(tab, event) {
      console.log(tab, event);
    }
  }
};
</script>

<style scoped>
.custom-descriptions {
  background-color: #f2f2f2;
}
</style>
